<?php
$dir = dirname(__FILE__);
$files = array('performance.php','project.php');
$db = include $dir.'/db.php';
$upload = include $dir.'/upload.php';
$ver  = include $dir.'/ver.php';
$copyright = include $dir.'/copyright.php';
$config = array (
	//默认模块
	'ROUTE' => array(
        'DEFAULT_APP'        => 'home',                        //默认访问APP
        'DEFAULT_CONTROLLER' => 'Index',                        //默认访问控制器
        'DEFAULT_ACTION'     => 'index',                        //默认访问动作
    ),
	//模板设置
	'TPL'=>array(
        'TPL_DEPR' => '/',
    ),
	//数据库
	'DB'=>array(
		'default' => $db,
	),
	'CACHE' => array(
		'default' => array(
			'CACHE_TYPE' => 'FileCache',
			'CACHE_PATH' => ROOT_PATH . 'cache/',
			'GROUP' => 'db',
			'HASH_DEEP' => 0,
		),
	),
    //上传配置
    'UPLOAD' => $upload,
    //版本信息
    'VER' => $ver,
    //版权信息
    'COPYRIGHT' => $copyright,
);

foreach ($files as $value) {
	$file = realpath($dir.'/'.$value);
	if(is_file($file)){
		$array = include $file;
		$config = array_merge_recursive($config,(array)$array);
	}
}

if(defined('SYSTEM_STATUS')){
	$system = include $dir.'/system.php';
	$config = array_merge($config,$system);
}

return $config;
